<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<#include "./common/header.html"/>
</head>
<body class="easyui-layout">
	<table id="dg" class="easyui-datagrid" title="API接口访问统计"
		style="width: 100%; height: 98%"
		data-options="
			iconCls: 'icon-ok',
			singleSelect: true,
			url:'${ctx}/apilog/querySlowLog',
			toolbar: '#tb',
			pageSize:10,
			pagination:true,
			pageNumber:1,
		">
		<thead>
			<tr>
				<th data-options="field:'method',width:200">方法</th>
				<th data-options="field:'cost',width:80">耗时</th>
				<th data-options="field:'status',width:100">状态码</th>
				<th data-options="field:'url',width:400">url</th>
			</tr>
		</thead>
	</table>
	
	<div id="tb" style="height:auto">
		方法：<input id="method" type="text" class="easyui-box">
		状态码：<input id="status" type="text" class="easyui-box">
		<a id="search" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
	</div>	
</body>
<script>
$('#search').click(function(){
   	var queryCnd = {};
    var status = $("#status").val();
    var method = $("#method").val();
    
    if(status != null) {
    	queryCnd.status = status;
    }
    
    if(method != null) {
    	queryCnd.method = method;
    }
    
    $('#dg').datagrid('load',queryCnd);
});
</script>
</html>
